<template>
	<view>
<!-- 		<view class="open-card">
			<view class="btn-box">
				<u-button
					custom-style="background-color:orange;width:160rpx;height:70rpx;color:#fff;padding:1rpx 5rpx;border:none"
					@click="open" shape="circle">开通会员
				</u-button>
				<view class="bind-card">
					<text @click="toBind">立即绑卡</text>
				</view>
			</view>
		</view> -->

		<view class="other-server">
			<view class="server-title">
				<text>其他服务</text>
			</view>
			<view class="server-moudle">
				<view class="moudle-item" @click="callCinema">
					<view class="item-img">
						<u-icon name="phone-fill" size="50rpx" color="#00ffff" />
					</view>
					<text class="name">热线客服</text>
				</view>
<!-- 				<view class="moudle-item" @click="toOrderList">
					<view class="item-img">
						<u-icon name="home-fill" size="50rpx" color="#ffb3ff" />
					</view>

					<text class="name">商家登录</text>
				</view> -->
				<view class="moudle-item" @click="toInformation">
					<view class="item-img">
						<u-icon name="bookmark-fill" size="50rpx" color="#ff0000" />
					</view>
					<text class="name">最新影讯</text>
				</view>
	<!-- 			<view class="moudle-item" @click="showModal = true">
					<view class="item-img">
						<u-icon name="bookmark-fill" size="50rpx" color="#ff0000" />
					</view>
					<text class="name">服务资质</text>
				</view> -->
			</view>
		</view>
		
		<u-modal :show="showModal" @confirm="showModal = false">
			
			<view class="">
				<image src="../../static/image/zz1.jpg" mode=""></image>
				<image src="../../static/image/zz2.jpg" mode=""></image>
			</view>
		</u-modal>
	</view>
</template>

<script>
	import {
		getCinemaInfo
	} from '../../common/http/api.js'
	export default {
		data() {
			return {
				cinemaTel: "",
				showModal:false
			}
		},
		methods: {
			toBind() {
				if (!this.$store.state.userPhone) {
					uni.navigateTo({
						url: "../../pages/getPhone/getPhone"
					})
					return
				}
				uni.navigateTo({
					url: "../../pages/bindCard/bindCard"
				})
			},
			toCoupons() {

				uni.navigateTo({
					url: "../../pages/buyCoupon/buyCoupon"
				})
			},
			open() {
				uni.navigateTo({
					url: "../../pages/openCard/openCardList"
				})

			},
			toOrderList() {

				uni.navigateTo({
					url: "../../pages/distributorLogin/distributorLogin"
				})
			},
			getCinemaInfo() {
				getCinemaInfo().then(res => {
					this.cinemaTel = res.cinemaPhone
				})
			},
			callCinema() {
				uni.makePhoneCall({
					phoneNumber: this.cinemaTel,
					fail:e=>{
						console.log(e);
					}
				})
			},
			toInformation() {
				uni.navigateTo({
					url: '/pages/information/information'
				})
			}

		},
		created() {
			this.getCinemaInfo()

		}
	}
</script>

<style lang="scss">
	.open-card {
		width: 90vw;
		padding: 115rpx 20rpx 20rpx 20rpx;
		margin: 20rpx auto;
		background-image: url(../../static/image/微信截图.png);
		background-size: 100% 100%;
		border-radius: 10rpx;
		box-shadow: 8rpx 8rpx 8rpx #999;



		.btn-box {
			display: flex;
			width: 350rpx;
			justify-content: space-between;
			align-items: center;

			.bind-card {
				border: 1px solid #fff;

				height: 60rpx;
				border-radius: 40rpx;
				font-size: 26rpx;
				padding: 2rpx 0;
				width: 160rpx;
				text-align: center;
				background-color: #fff;
				color: royalblue;

				text {
					line-height: 60rpx;
				}
			}


		}

	}

	.other-server {
		width: 90vw;
		margin: 20rpx auto;
		background-color: #fff;
		padding: 20rpx;
		border-radius: 10rpx;
		font-size: 28rpx;
		box-shadow: 8rpx 8rpx 8rpx #e0e0eb;

		.server-title {
			border-bottom: 1px solid #f0f0f5;
			padding-bottom: 20rpx;
		}

		.server-moudle {
			display: flex;

			padding: 40rpx 25rpx;

			.moudle-item {
				display: flex;
				flex-direction: column;
				align-items: center;
				margin-right: 35rpx;


				.item-img {
					width: 60rpx;
					height: 60rpx;
					border-radius: 50%;
					display: flex;
					justify-content: center;
					align-items: center;
				}

				.name {
					font-size: 24rpx;
					color: #999;
				}
			}
		}
	}
</style>